package com.atomic.test.example.service;


import com.atomic.test.example.entity.Topic;
import com.atomic.test.example.query.QueryPageList;

import java.util.List;

/**
 * Created by dreamyao on 2017/3/6.
 */
public interface ITopicService {

    /**
     * 创建话题
     * @param topic
     * @return
     */
    Integer createTopic(Topic topic);

    /**
     * 更新话题
     * @param topic
     */
    void updateTopic(Topic topic);

    /**
     * 根据话题Id查询话题信息
     * @param topicId
     * @return
     */
    Topic findOneTopicById(Integer topicId);

    /**
     * 查询所有话题
     * @return
     */
    List<Topic> findAllTopic();

    /**
     * 根据话题标题查询话题信息
     * @param topicTitle 话题标题
     * @return 话题信息
     */
    Topic findTopicByTopicTitle(String topicTitle);

    /**
     * 根据话题标题删除话题
     * @param topicTitle
     */
    void deleteTopicByTopicTitle(String topicTitle);
}
